package com.jhgsys.internal.contractor.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jhgsys.internal.common.entity.QueryRequest;
import com.jhgsys.internal.contractor.entity.BaseContractor;

import java.util.List;

/**
 * 承包方设置 Service接口
 *
 * @author admin
 * @date 2024-07-29 14:19:02
 */
public interface IBaseContractorService extends IService<BaseContractor> {
    /**
     * 查询（分页）
     * @author admin
     * @date 2024-07-29 14:19:02
     * @param request QueryRequest
     * @param baseContractor baseContractor
     * @return IPage<BaseContractor>
     */
    IPage<BaseContractor> findBaseContractors(QueryRequest request, BaseContractor baseContractor);

    /**
     * 查询（所有）
     * @author admin
     * @date 2024-07-29 14:19:02
     * @param baseContractor baseContractor
     * @return List<BaseContractor>
     */
    List<BaseContractor> findBaseContractors(BaseContractor baseContractor);

    /**
    * 根据ID查询
    * @author admin
    * @date 2024-07-29 14:19:02
    * @param contractorId
    * @return BaseContractor
    */
    BaseContractor findBaseContractorById(String contractorId);

    /**
     * 新增
     * @author admin
     * @date 2024-07-29 14:19:02
     * @param baseContractor baseContractor
     */
    void createBaseContractor(BaseContractor baseContractor);

    /**
     * 修改
     * @author admin
     * @date 2024-07-29 14:19:02
     * @param baseContractor baseContractor
     */
    void updateBaseContractor(BaseContractor baseContractor);

    /**
     * 逻辑删除
     * @author admin
     * @date 2024-07-29 14:19:02
     * @param baseContractor baseContractor
     * @param baseContractorIds baseContractorIds
     */
    void deleteBaseContractor(BaseContractor baseContractor,String baseContractorIds);

    /**
    * 物理删除
    * @author admin
    * @date 2024-07-29 14:19:02
    * @param baseContractorIds baseContractorIds
    */
    void physicallyDeleteBaseContractor(String baseContractorIds);


    /**
     * 逻辑删除承包商
     * @param contractor
     */
    void updateBaseContractorDeletedFlg(BaseContractor contractor);

    /**
     * 根据名字查找承包商
     * @param contractorName
     * @return
     */
    BaseContractor findByName(String contractorName);
}
